package com.yifeng.po;

import java.io.Serializable;

/**
 * 系统权限管理
 */
public class Permission implements Serializable {
	private Long id;
	private String sn;
	private Long pId;
	private Long parentId;

	public Long getpId() {
		return pId;
	}

	public Long getParentId() {
		return pId;
	}

	public void setpId(Long pId) {
		this.pId = pId;
	}

	private String name;// 权限名称
	private String title;// 权限名称
	private String resource;// 资源地址
	// 额外增加的字段
	private Integer state = 0;// 状态:0:正常(默认),-1:禁用
	private Integer is_parent;

	public Permission() {

	}

	public Permission(String name, String resource) {
		this.name = name;
		this.resource = resource;
	}

	public String getTitle() {
		return name;
	}

	public Integer getIs_parent() {
		return is_parent;
	}

	public void setIs_parent(Integer is_parent) {
		this.is_parent = is_parent;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getResource() {
		return resource;
	}

	public void setResource(String resource) {
		this.resource = resource;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	@Override
	public String toString() {
		return "Permission [id=" + id + ", sn=" + sn + ", name=" + name
				+ ", resource=" + resource + ", state=" + state + "]";
	}


}
